﻿// -------------------------------------------------------------------------
//    @FileName         :    NFCityMapMgr.h
//    @Author           :    Gao.Yi
//    @Date             :    2025-09-16
//    @Email			:    445267987@qq.com
//    @Module           :    NFCityMapMgr
//    @Desc             :
//
// -------------------------------------------------------------------------

#pragma once

#include "NFCityMapInst.h"
#include "NFComm/NFObjCommon/NFObject.h"
#include "NFLogicCommon/NFLogicShmTypeDefines.h"

class NFCityPlayer;

class NFCityMapMgr : public NF_OBJECT_GLOBAL_TEMPLATE_MACRO(NFCityMapMgr, EOT_CITY_MAP_MGR_ID, NFObject)
public:
    NFCityMapMgr();
    ~NFCityMapMgr() override;
    int CreateInit();
    int ResumeInit();

public:
    int Init();

public:
    NFCityMapInst* GetMapInst(NFCityPlayer* pPlayer, int iMapDescId);
    NFCityMapInst* GetStaticMap(int iMapDescId);
    NFCityMapInst* CreateStaticMap(int iMapDescId);
    int DestroyMapInst(NFCityMapInst* pMapInst);

private:
    bool m_bInited;
    NFShmHashMap<int, int, MAX_CITY_MAP_NUM> m_aiStaticMapInst;
};
